<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>社区矫正信息管理平台</title>
<link href="../../static/css/default.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="../../static/images/favicon.ico" type="image/x-icon" />  
<link rel="stylesheet" type="text/css"
	href="../../static/js/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../../static/js/themes/icon.css" />
<script type="text/javascript" src="../../static/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../../static/js/jquery.easyui.min.1.2.2.js"></script>
<script type="text/javascript" src="../../static/js/outlook2.js"></script>
<script type="text/javascript">
	$(function() {
		InitLeftMenu(${user.id});//初始化左侧菜单
		tabClose();//TAB选项卡事件
		tabCloseEven();//绑定右键菜单事件
		//退出登录
		$('#loginOut').click(function() {
			$.messager.confirm('系统提示', '您确定要退出本次登录吗?', function(r) {
				if (r) {
					location.href = '/logout';
				}
			});
		})
	});
	/*当flag=true时，启动定时器，否则不启动*/
	var flag=true;
    /**
     * 从数据库中查询收件箱中未读信息，如果有弹出消息通知
	 */
    var notice=function () {
        $.ajax({
            type: "Get",
            dataType: "json",
            url: "/points/getCount",
            data: {
                receiveId: ${userIdLogin.id},
            },
            //显示分页
            success: function (msg) {
				/*如果收件箱中没有未读信件，改变定时器的状态，停止定时器*/
				if(msg.data==null){
					flag=false;
				}else{
                    var unread = msg.data[0];
                    var a1='<a href="javascript:void(0)" onclick="clicks()">您有'+unread+'条未读数据</a>';
                    $.messager.show({
                        title:'提示',
                        msg:a1,
                        timeout:5000,
                        showType:'slide',
                    });
				}
            }
        });
    }
    /**
     * 模拟站内信息（收件箱的点击事件）
     */
	var clicks=function () {
		$("#nav ul:last li:last a").trigger("click");
    }
    /**
     * 用定时器启动消息通知
	 */
	var start=function () {
        if(flag){
            window.setInterval("notice()",5000);
        }
    }
    /**
     * 启动定时器
	 */
	start();
</script>
</head>
<body class="easyui-layout" style="overflow-y: hidden" scroll="no">
	<div region="north" split="true" border="false"
		style="overflow: hidden; height: 55px; background: url(../../static/images/layout-browser-hd-bg.gif) #7f99be repeat-x center 50%; line-height: 40px; color: #fff; font-family: Verdana, 微软雅黑, 黑体">
		<span style="float: right; padding-right: 20px; font-size: 16px;"
			class="head"><a href="sysuser/update" id="adminName">欢迎您,${user.realname}</a> <a href="#" id="loginOut">安全退出</a></span> <span
			style="padding-left: 10px; font-size: 32px;"><img
			src="../../static/images/huizhang1.png" width="50" height="50" align="absmiddle" />正风司法局社会矫正信息管理平台</span> &nbsp;&nbsp;&nbsp;&nbsp;
			<!-- 显示时间插件-->
				</script>
				<span id="webjx" style="font-style: inherit;font-family: fantasy;font-size: 22px;"></span>
				<script>
					setInterval("webjx.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());",1000);
   				</script>
	</div>
	<div region="south" split="true"
		style="height: 30px; background: #D2E0F2;">
		<div class="footer">正风司法局社会矫正信息管理平台</div>
	</div>
	<div region="west" hide="true" split="true" title="导航菜单"
		style="width: 180px;" id="west">
		<div id="nav" class="easyui-accordion" fit="true" border="false">
			<!--  导航内容 -->
		</div>
	</div>
	<div id="mainPanle" region="center"
		style="background: #eee; overflow-y: hidden">
		<div id="tabs" class="easyui-tabs" fit="true" border="false">
			<div title="欢迎使用" 
				style="padding: 20px; overflow: hidden; color: black;background-color: #AEDEF4">
				<h1 style="font-size:30px;">欢迎使用正风司法局社区矫正信息管理平台!</h1>
				</div>
		</div>
	</div>
	<div id="mm" class="easyui-menu" style="width: 150px;">
		<div id="mm-tabupdate">刷新</div>
		<div class="menu-sep"></div>
		<div id="mm-tabclose">关闭</div>
		<div id="mm-tabcloseall">全部关闭</div>
		<div id="mm-tabcloseother">除此之外全部关闭</div>
		<div class="menu-sep"></div>
		<div id="mm-tabcloseright">当前页右侧全部关闭</div>
		<div id="mm-tabcloseleft">当前页左侧全部关闭</div>
		<div class="menu-sep"></div>
		<div id="mm-exit">退出</div>
	</div>
</body>
</html>